package cn.seocoo.platform.base.service.impl;

import java.util.List;

import cn.seocoo.platform.base.dto.BaseCommonDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.seocoo.platform.base.mapper.BaseEngineMapper;
import cn.seocoo.platform.base.domain.BaseEngine;
import cn.seocoo.platform.base.service.IBaseEngineService;
import cn.seocoo.platform.common.core.text.Convert;

/**
 * 发动机品牌 服务层实现
 * 
 * @author wujian
 * @date 2019-12-30
 */
@Service
public class BaseEngineServiceImpl implements IBaseEngineService 
{
	@Autowired
	private BaseEngineMapper baseEngineMapper;

	/**
     * 查询发动机品牌信息
     * 
     * @param id 发动机品牌ID
     * @return 发动机品牌信息
     */
    @Override
	public BaseEngine selectBaseEngineById(Integer id)
	{
	    return baseEngineMapper.selectBaseEngineById(id);
	}
	
	/**
     * 查询发动机品牌列表
     * 
     * @param baseEngine 发动机品牌信息
     * @return 发动机品牌集合
     */
	@Override
	public List<BaseEngine> selectBaseEngineList(BaseEngine baseEngine)
	{
	    return baseEngineMapper.selectBaseEngineList(baseEngine);
	}
	
    /**
     * 新增发动机品牌
     * 
     * @param baseEngine 发动机品牌信息
     * @return 结果
     */
	@Override
	public int insertBaseEngine(BaseEngine baseEngine)
	{
	    return baseEngineMapper.insertBaseEngine(baseEngine);
	}
	
	/**
     * 修改发动机品牌
     * 
     * @param baseEngine 发动机品牌信息
     * @return 结果
     */
	@Override
	public int updateBaseEngine(BaseEngine baseEngine)
	{
	    return baseEngineMapper.updateBaseEngine(baseEngine);
	}

	/**
     * 删除发动机品牌对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteBaseEngineByIds(String ids)
	{
		return baseEngineMapper.deleteBaseEngineByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<BaseCommonDto> getEngineList() {
		return baseEngineMapper.getEngineList();
	}

}
